class DeviceInfo {
  final String name; // 方舱名称
  final String cubicleNo; // 方舱编号
  final String deviceNo; // 设备编号
  final String tag; // 标签
  final int status; // 0关闭，1运行

  DeviceInfo({
    required this.name,
    required this.cubicleNo,
    required this.deviceNo,
    required this.tag,
    required this.status,
  });
}

class AirConditionerInfo {
  final String label;
  final String address;
  final String dataType;
  final int status;

  AirConditionerInfo({
    required this.label,
    required this.address,
    required this.dataType,
    required this.status,
  });

  factory AirConditionerInfo.fromJson(Map<String, dynamic> json) {
    return AirConditionerInfo(
      label: json['label'] ?? '',
      address: json['address'] ?? '',
      dataType: json['dataType'] ?? '',
      status: json['status'] ?? 0,
    );
  }
}

class AirSourceUnitInfo {
  final String label;
  final String address;
  final String dataType;
  final int status;

  AirSourceUnitInfo({
    required this.label,
    required this.address,
    required this.dataType,
    required this.status,
  });

  factory AirSourceUnitInfo.fromJson(Map<String, dynamic> json) {
    return AirSourceUnitInfo(
      label: json['label'] ?? '',
      address: json['address'] ?? '',
      dataType: json['dataType'] ?? '',
      status: json['status'] ?? 0,
    );
  }
}